package com.easychat.entity.config;

import com.easychat.interceptor.GlobalIntercepter;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * @author 10 2024/10/8
 */
@Configuration
public class WebMvcConfiguration implements WebMvcConfigurer {
    @Resource
    private GlobalIntercepter globalIntercepter;

    //分权限，使用aop实现登录校验
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(globalIntercepter).addPathPatterns("/**").excludePathPatterns("/account/register").excludePathPatterns("/account/login");
//    }
}
